#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main()
{
	double num = 1.0;
	double sum = 0.0;
	for (num = 1.0; num <= 100; num++)
	{
		if ((int)num % 2 == 0)
			sum -= 1.0 / num;
		else
		sum += 1.0 / num;
	}

	printf("sum = %.6f\n", sum);


	return 0;
}



